package com.jinghui.xiaoyuanliao.ui;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;

import com.jinghui.xiaoyuanliao.R;

public class Welcome {

    private static Context context;
    private static int[] image;

    public Welcome(Context context){
        this.context = context.getApplicationContext();
    }
    public static void showWelcom(){
        View inflate = LayoutInflater.from(context).inflate(R.layout.activity_welcome, null);
        ViewPager mVp = (ViewPager) inflate.findViewById(R.id.welcome_vp);
        image = getImage();
    }

    private static int[] getImage() {
        return new int[]{R.mipmap.ic_launcher};
    }
    private static class MyAdapter extends PagerAdapter{
        @Override
        public int getCount() {
            return image != null ? image.length:0;
        }

        @Override
        public boolean isViewFromObject(View view, Object object) {
            return false;
        }
    }
}
